/**
 * Created by Esri on 2016/6/28.
 */
define([ "dojo/_base/declare",
        "gistech/widgets/baseWidget/BaseWidget",
        "dojo/_base/lang",
        "dojo/on",
        "dojo/query",
        "dojo/dom-style",
        "dojo/dom-class",
        "dojo/dom-attr",
        "dojo/text!./templates/Template.html"],
    function(declare,BaseWidget,lang,on,query, 
    		domStyle,domClass,domAttr,template) {
	
        return declare([BaseWidget], {
            templateString : template,
            map:null,
            
            constructor : function(args) {
                this.inherited(arguments);
                this.map=args.map;
            },
            
            postCreate : function() {
                this.inherited(arguments);
                this.init();
                this.bindEvent();
            },
            
            startup:function(){
                this.inherited(arguments);
            },
            
            destroy:function(){
                this.inherited(arguments);
            },
            
            init:function(){

            },
            
            bindEvent:function(){
            	on(this.zoomin, "click", lang.hitch(this, this.ZoomIn));
            	on(this.zoomout, "click", lang.hitch(this, this.ZoomOut));
            },
            
            ZoomIn:function(){
            	var cur_zoom=this.map.getZoom();
            	cur_zoom++;
            	this.map.setZoom(cur_zoom);
            },
            
            ZoomOut:function(){
            	var cur_zoom=this.map.getZoom();
            	cur_zoom--;
            	this.map.setZoom(cur_zoom);
            }
        })
    }
);